import monte.Simulation;
import monte.SimulationResult;
import monte.TeamGenerator;
import monte.cs.DoubleFailureCS;
import monte.cs.SingleFailureCS;
import monte.exception.NoResultsException;

public class Main {
    public static void main(String[] args) {
        try {
            Simulation simulation = new Simulation(100000);
            simulation.setCompetitionSystem(new SingleFailureCS());
//            simulation.setCompetitionSystem(new DoubleFailureCS());
            TeamGenerator teamGenerator = new TeamGenerator();
            simulation.setTeams(teamGenerator.generateTeams(10, new TeamGenerator.EqualRatioGenerator(100, 0.98)));
            simulation.startSimulation();
            SimulationResult results = simulation.getSimulationResult();
            System.out.println(results);
        } catch (NoResultsException e) {
            System.out.println(e);
        }
    }
}
